// 引入阿里图标库
@import url('//at.alicdn.com/t/c/font_8d5l8fzk5b87iudi.css');

// 全局样式重置
* {
  box-sizing: border-box;
}

page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background: #f8f9fa;
}

// 通用布局类
.container {
  padding: 20px;
}

.section {
  margin-bottom: 20px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

// 通用按钮样式
.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  
  &.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    
    &:hover {
      opacity: 0.9;
      transform: translateY(-1px);
    }
    
    &:disabled {
      opacity: 0.5;
      transform: none;
    }
  }
  
  &.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    border: 1px solid #ddd;
  }
  
  &.btn-gradient {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #333;
  }
}

// 卡片样式
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(31, 38, 135, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

// 输入框样式
.input {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  background: #f5f5f5;
  
  &:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
  }
  
  &::placeholder {
    color: #999;
  }
}

// 标签样式
.tag {
  display: inline-block;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px;
}

// 加载状态
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// 空状态
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  
  .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
  }
  
  .empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
  }
  
  .empty-desc {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
  }
}

// 响应式布局
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .card {
    padding: 16px;
  }
}

// 主题色变量（供 Taro 组件使用）
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #ff9a9e;
  --background-color: #f8f9fa;
  --card-background: rgba(255, 255, 255, 0.95);
  --text-color: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --border-color: #eee;
  --shadow-light: 0 4px 20px rgba(31, 38, 135, 0.1);
  --shadow-medium: 0 8px 32px rgba(31, 38, 135, 0.15);
} 